import type { ProfileDetail, ProfileParams } from '@/types/profile'
import http from '@/utils/http'

/**
 * 获取会员详情
 */
export const getMemberProfileAPI = () => {
  return http<ProfileDetail>({
    method: 'GET',
    url: '/member/profile'
  })
}

/**
 * 修改会员信息
 * @param data 请求体参数
 */
export const putMemberProfileAPI = (data: ProfileParams) => {
  return http<ProfileDetail>({
    method: 'PUT',
    url: '/member/profile',
    data
  })
}
